package com.own.property;

import lombok.Data;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.unit.DataSize;

/**
 * CustomLoggingProperty
 *
 * @author chenxueli
 * @date 2023-07-11 14:53:54
 */
@Data
@SpringBootConfiguration
@ConfigurationProperties(prefix = "logging.logback.rollingpolicy")
public class CustomLoggingProperty {

    /**
     * 日志文件的最大大小
     */
    private DataSize maxFileSize = DataSize.ofMegabytes(10L);

    /**
     * 文件名称
     */
    private String fileNamePattern = "";

    /**
     * 日志保存的最大天数
     */
    private Integer maxHistory = 7;

    /**
     * logstash 的地址
     */
    private String logstashUri = "";

}
